package com.yupi.springbootinit.model.enums;

import lombok.Getter;

/**
 * @Description
 * @Author minify
 * @Date 2023/12/16 18:12
 * @Project mybi-backend
 */
@Getter
public enum TaskStatusEnum {

    /**
     * 任务状态  0-wait，1-running，2-finish，3-failed
     */
    WAITING(0, "等待执行"),
    RUNNING(1, "正在执行"),
    FINISHED(2, "执行完成"),
    FAILED(3, "执行失败"),
    CANCELED(4, "已取消");

    private final int code;
    private final String desc;

    TaskStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
